package com.aaa.mythread;

public class MyThread2 implements Runnable{

    private String name;


    public MyThread2(String name) {
        this.name = name;
    }

    @Override
    public void run() {
        for (int i = 0; i < 5; i++) {
            System.out.println(name+":数字是:"+i);
        }
    }


    public static void main(String[] args) {
        // 使用这个线程
        MyThread2 myThread2 = new MyThread2("eee");
        // 启动
        //
        Thread thread = new Thread(myThread2);
        thread.start();





    }
}
